//合并表单
export const renderContent = (data, key) => {
    var spanArr = [];
    var position = 0;
    data.map((item, index) => {
        if (index === 0) {
            spanArr.push(1);
            position = 0;
        } else {
            if (data[index][key] === data[index - 1][key]) {
                spanArr[position] += 1;
                spanArr.push(0);
            } else {
                spanArr.push(1);
                position = index;
            }
        }
    });
    return spanArr;
};